package edu.sctu.practice.class02.liqing.assignment02;

/**
 * Created by 123456 on 2015/10/9.
 */
public class Rational {
    double num1;
    double num2;
    double num3;


    public Rational(double num1, double num2) {
        this.num1 = num1;
        this.num2 = num2;
    }

    public double getSum() {
        return num3 = num1 + num2;
    }

    public double getMinus() {
        return num3 = num1 - num2;
    }

    public double getMultiply() {
        return num3 = num1 * num2;
    }

    public double getDivide() {
        return num3 = num1 / num2;
    }
}
